﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:Nok_Air"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Nok_Air.SelectFlightPage"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="40">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">
        <Grid.Resources>
            <DataTemplate x:Key="flightTemplate">
                <Border Margin="0,0,0,20" Width="420" Background="#CCFFFFFF" CornerRadius="5" >
                    <StackPanel Margin="10">
                        <Border CornerRadius="2">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFBB00" Offset="1"/>
                                    <GradientStop Color="Transparent"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Flight}" FontSize="40" Foreground="Black" Margin="20,0,0,0"/>
                                <TextBlock Text="{Binding FlightNo}" FontSize="40" Foreground="Black" Margin="10,0,0,0"/>
                            </StackPanel>
                        </Border>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding From}" Width="80" FontSize="34.667" Foreground="Black" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}"/>
                            <TextBlock Text="{Binding LDepartFrom}" Width="290" Margin="10,0,0,0" FontSize="34.667" Foreground="Black"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding To}" Width="80" FontSize="34.667" Foreground="Black" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}"/>
                            <TextBlock Text="{Binding LArriveTo}" Width="290" Margin="10,0,0,0" FontSize="34.667" Foreground="Black"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Date}" Width="80" FontSize="34.667" Foreground="Black" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}"/>
                            <StackPanel>
                                <TextBlock Text="{Binding FlightDate, Converter={StaticResource DayConverter4}}" Width="290" Margin="10,0,0,0" TextWrapping="Wrap" FontSize="34.667" Foreground="Black"/>
                                <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
                                    <TextBlock Text="{Binding DepartTime}" FontSize="34.667" Foreground="Black"/>
                                    <TextBlock Text=" - " FontSize="34.667" Foreground="Black"/>
                                    <TextBlock Text="{Binding ArrivalTime}" FontSize="34.667" Foreground="Black"/>
                                </StackPanel>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </Border>
            </DataTemplate>
            <local:DayConverter4 x:Key="DayConverter4" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="70"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <Grid Style="{StaticResource TopAppBarStyle}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition  Width="1*"/>
                <ColumnDefinition  Width="2*"/>
                <ColumnDefinition  Width="1*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Content="Back" HorizontalAlignment="Left"  Width="130" Margin="15,0,0,0" Height="60" Style="{StaticResource BackButtonStyle}" Foreground="White" Visibility="Collapsed" />
            <TextBlock x:Name="Title_checkIn_TextBlock" Margin="0" TextWrapping="Wrap" Text="{Binding SelFlightTitle}" FontSize="48" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Grid.Column="1"/>

        </Grid>
        <Grid Style="{StaticResource ContentStyle}" Margin="0">
            <StackPanel d:LayoutOverrides="Width" Margin="10">
                <TextBlock Margin="20,20,0,0" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="48" Foreground="#FF0A0202" Text="{Binding SelFlightMsg}"/>
                <ListBox x:Name="FlightListBox" ItemsSource="{Binding GetPassengersResult.Flights}" VerticalAlignment="Top" Margin="20,20,20,0" SelectionChanged="FlightListBox_SelectionChanged" Height="580" ItemTemplate="{StaticResource flightTemplate}">
                </ListBox>
            </StackPanel>
        </Grid>
        <Grid Grid.Row="2">
            <local:AppBarMenuUserControl/>
        </Grid>


        <!--TitlePanel contains the name of the application and page title-->

        <!--ContentPanel - place additional content here-->
        <Popup IsOpen="False" x:Name="progressbar">
            <Popup.Child>
                <local:ProgressBarUserControl/>
            </Popup.Child>
        </Popup>
    </Grid>
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
